﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>会员管理</title>
<link href="__PUBLIC__/admin/css/xc.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/css/xc.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/css/page.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/xc.js"></script> 
<script type="text/javascript" src="__PUBLIC__/admin/js/xc.admin.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/layer/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/My97DatePicker/WdatePicker.js"></script>
</head>
<body><div class="bDiv" style="height: auto;" id="ajax_return">
<nav class="breadcrumb mb10">
  <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 会员管理 <span class="c-gray en">&gt;</span> 会员列表 
  <a class="btn btn-success radius r mr-20 btn-shua" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pd-20">
  <form action="{:U('User/lowerUser')}" method="post" id="myfrom1">
  
  <div class="text-c"> 搜索
    <span class="select-box inline">
      <select class="select" name="xcinput">
        <option value="us_uid">会员编号</option>
        <option value="us_name">会员姓名</option>
        <option value="us_phone">手机号</option>
        <option value="us_pid">推荐人ID</option>
        <option value="gr_name">会员等级</option>
      </select>
    </span>
    <input type="text" id="keyword" name="keyword" placeholder="请输入搜索内容" class="input-text" style="width:250px;">
    <input type="text" onfocus="WdatePicker()" value="{$timegap.beg}" id="stime" name="stime" class="input-text Wdate" style="width:120px;"> -
	<input type="text" onfocus="WdatePicker()" value="{$timegap.end}" id="etime" name="etime" class="input-text Wdate" style="width:120px;">
    <button type="button" class="btn btn-success radius" onClick="ajax_get_table('myfrom1',1)"><i class="Hui-iconfont">&#xe665;</i> 搜会员</button>
    <!-- <button class="btn btn-primary radius"><i class="Hui-iconfont">&#xe603;</i> 导出数据</button> -->
  </div>
  <div class="mt-10">
    <!--列表加载-->
    

		<script type="text/javascript" src="__PUBLIC__/admin/js/common-1.0.js"></script> 
		<div class="cl pd-5 bg-1 bk-gray mb-10"><span class="r mt-3">共有数据：<strong>{$rows}</strong> 条</span></div>
		<table id="xctable" class="table table-border table-bordered table-hover table-bg table-sort">
		  <thead>
		    <tr class="text-c">
		      <th width="40" id="us_id" onClick="tab_sort(this)"><div class="">编号</div></th>
		      <th width="55">操作</th>
		      <th width="80" id="us_uid" onClick="tab_sort(this)"><div class="">会员编号</div></th>
					<th width="80" id="us_gid" onClick="tab_sort(this)"><div class="">会员等级</div></th>
		      <th width="80" id="us_pid" onClick="tab_sort(this)"><div class="">推荐人ID</div></th>
					<th width="80" id="us_name" onClick="tab_sort(this)"><div class="">姓名</div></th>
		      <th width="80" id="us_phone" onClick="tab_sort(this)"><div class="">手机号</div></th>
					<th width="60" id="us_money" onClick="tab_sort(this)"><div class="">余额</div></th>
					<th width="60" id="us_points" onClick="tab_sort(this)"><div class="">冻结积分</div></th>
					<th width="60" id="us_frozen" onClick="tab_sort(this)"><div class="">购物积分</div></th>
					<th width="60" id="us_equity" onClick="tab_sort(this)"><div class="">股权</div></th>
		      <th width="70" id="us_count" onClick="tab_sort(this)"><div class="">直推人数</div></th>
					<th width="70" id="us_scount" onClick="tab_sort(this)"><div class="">伞下人数</div></th>
					<th width="70" id="us_smoney" onClick="tab_sort(this)"><div class="">伞下业绩</div></th>
		      <th width="100" id="us_atime" onClick="tab_sort(this)"><div class="">注册时间</div></th>
					<th width="70"  onClick="tab_sort(this)"><div class="">查看团队</div></th>
		      <th width="70" id="us_state" onClick="tab_sort(this)"><div class="">状态</div></th>

		    </tr>
		  </thead>
		  <volist name="list" id="vo" >
		  <tr class="text-c">
		    <td>{$vo.us_id}</td>
		    <td class="flexigrid"><div style="text-align:left;min-width:50px !important; max-width:inherit !important;"> <span class="btn1"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
		      <ul><li><a href="{:U('User/userShow',array('id'=>$vo['us_id']))}" target="_blank">登陆会员</a></li>
		      <if condition="($vo.us_state eq 1)">
		        <li><a onClick="update_state('user','us_id={$vo.us_id}','us_state','2','锁定');" href="javascript:;" title="锁定"><i class="Hui-iconfont">&#xe60e;</i>锁定</a></li>
		        <li><a onclick="layer_show('编辑信息','__MODULE__/User/userEdit?id={$vo.us_id}','600','450')" href="javascript:;">编辑信息</a></li>
		        <li><a onclick="layer_open('[{$vo.us_name}]资金明细','__MODULE__/Income/income?id={$vo.us_uid}','','500')" href="javascript:;">资金明细</a></li>
		      <elseif condition="($vo[us_state] eq 2)"/>
		        <li><a onClick="update_state('user','us_id={$vo.us_id}','us_state','1','解锁');" href="javascript:;" title="解锁"><i class="Hui-iconfont">&#xe63f;</i>解锁</a></li>
		      <elseif condition="($vo.us_state eq 3) && ($vo[us_count] elt 0)"/>
		        <li><a onClick="userDelete(this,'{$vo.us_uid}');" href="javascript:;" title="删除">删除会员</a></li>
		      </if>
		      </ul></span></div>
		    </td>
		    <td>{$vo.us_uid}</td>
				<td>{$vo.grade.gr_name}</td>
				<td><if condition="($vo.us_pid neq 0)">{$vo.us_pid}<else />无</if></td>
		    <td><a href="{:U('User/userShow',array('id'=>$vo['us_id']))}" target="_blank">{$vo.us_name}</a></td>
		    <td>{$vo.us_phone}</td>
				<td>{$vo.us_money}</td>
		    <td>{$vo.us_points}</td>
				<td>{$vo.us_frozen}</td>
		    <td>{$vo.us_equity}</td>
		    <td>{$vo.us_count}</td>
				<td>{$vo.us_scount}</td>
				<td>{$vo.us_smoney}</td>
		    <td>{$vo.us_atime|date='m-d H:i',###}</td>
				<td><a href="javascript:;" onClick="layer_show('查看会员','__MODULE__/User/lowerUser?id={$vo.us_uid}')">查看</a></td>
		    <td>
		      <if condition="($vo.us_state eq 1)">
		        <span class="label label-success radius">{$ustate['1']}</span>
		      <elseif condition="($vo.us_state eq 2)"/>
		        <span class="label label-danger radius">{$ustate['2']}</span>
		      <elseif condition="($vo.us_state eq 3)"/>
		        <span class="label label-primary radius">{$ustate['3']}</span>
		      </if>
		    </td>

		  </tr>
		  <input type="hidden" name="pid" value="{$vo.us_pid}">
		  </volist>
		</table>
    
  </form>
</div></div>
<script type="text/javascript">
function ajax_get_table(tab,page){
	cur_page = page; //当前页面 保存为全局变量
	$.ajax({
		type : "POST",
		url:"__MODULE__/User/lowerUser",//+tab,
		data : $('#myfrom1').serialize(),// 你的formid
		success: function(data){
			$("#ajax_return").html('');
			$("#ajax_return").append(data);
		}
	});
}
//回调函数 
function call_back_fun(v){
	//layer.closeAll(); // 关闭窗口
	ajax_get_table('myfrom1',cur_page);
}
</script>
</body>
</html>